RiverSync
SPEC-DWF · v0.4
28 June 2026
Owner: Platform team

Data workflows — the entity lifecycle map

The create, update, retire and archive journey of every business entity: its states, the transitions between them, and for each transition who acts, the domain event it emits, the rule that governs it and the process it happens within. One view across the eight bounded contexts, so the data lifecycle is legible end to end.

DraftSPEC-DWF · data lifecycle
A view over the model — it owns no definitions. Entities come from the ERD, events & ownership from the DDD set, and processes from the PWF set; the lifecycle invariants trace to the platform requirements (LIF-1…4 in SPEC-PRD). On any conflict the platform master wins. Everything renders from dwf/dwf-catalog.js — definitions are never copied per document.

1The lifecycle landscape

Eight bounded contexts, each owning the lifecycle of its entities. State kinds:

2Create · update · retire matrix

Which operations each entity's lifecycle exposes. Read scope is governed per app by the Federation model — not shown here.

3Lifecycle rules

The data-workflow invariants (DWF-1…8). They trace to the lifecycle requirements (LIF-1…4), the DM integrity rules and the SVC architecture rules — the ERD and DDD sets hold those in full.

4Revision history

VersionDateChanges
0.127 Jun 2026First draft — the SPEC-DWF data-workflow set introduced (master + eight bounded-context drill-downs), mapping each entity's create/update/retire/archive lifecycle to its states, domain events, DM/SVC rules and PWF processes. Adds DWF-1…8 lifecycle rules; the lifecycle requirements LIF-1…4 were added to SPEC-PRD v0.26 and are traced here.
0.328 Jun 2026Sales CRM lifecycles added (SPEC-DWF-SAL). The sales context gains four entity state machines — Contact (prospect → active → dormant / disqualified, with the conversion bridge), Lead (new → working → qualified → converted / disqualified), Opportunity (exploring → solutioning → validated → confirmed / declined) and Activity (logged → void) — plus a second Deal create-edge from opportunity.confirmed. New rules DWF-9 (the one-way contact→lead→opportunity→deal chain) and DWF-10 (the tenancy bridge). Cascades from SPEC-PRD SAL-1…8 / SPEC-ERD DM-43…52; rides the new Lead to opportunity process (SPEC-PWF-L2O).
0.428 Jun 2026Communications inbox lifecycle added (SPEC-DWF-SAL). The sales context gains the Conversation state machine (draft → open → junk / archived / deleted) driven by message.received · message.sent · conversation.foldered — junk/deleted reversible soft states, deleted retained per LIF-1; Message under others. Cascades from SPEC-PRD SAL-9 / SPEC-ERD DM-53 · DM-54 / SPEC-APP-PIP PIP-15; rides the new Communications process (SPEC-PWF-COM).
0.528 Jun 2026Conversation forwarding (SPEC-DWF-SAL). The Conversation state machine gains an open → open self-transition forwarded on its channel (Forward / Forward all) on the new conversation.forwarded event; the Message note records that a Forward re-sends the conversation and Forward all the whole thread as a new outbound message. Cascades from SPEC-PRD SAL-9 (amended) / SPEC-ERD DM-54 / SPEC-APP-PIP PIP-15.
RiverSync Co., Ltd. · BangkokSPEC-DWF · 1 of 1